<?php 
if(!defined('ADMIN')){
	exit('Access Denied');
}

$act_arr=array('list','addedi','del','set');
?>
<script>
$(function(){
    $('#node_id').change(function(){
	    var node = $(this).val();
		$('#node').val(node);
	});
	$('#mod_id').change(function(){
	    var node = $(this).find("option:selected").text();
		$('#mod').val(node);
	});
	$('#act_id').change(function(){
	    var node = $(this).find("option:selected").text();
		$('#act').val(node);
	});
})
</script>
<div class="pageContent">
<form action="index.php?mod=<?=MOD?>&act=<?=ACT?>" method="post"  class="pageForm required-validate"  name="form1" onsubmit="return validateCallback(this, dialogAjaxDone);">
<input type="hidden" name="id" value="<?=$row['subjectid']?>" />
<input type="hidden" name="sub" value="save" />
<div class="pageFormContent" layoutH="60">
<p><label>调查标题：</label>
<input name="subject" type="text" size="50"  id="subject" value="<?=$row['subject']?>" class="required" /></p>
<p><label>上线时间：</label>
<input name="fromdate" type="text" size="20"  id="fromdate" value="<?=$row['fromdate']?$row['fromdate']:date("Y-m-d")?>" class="date" dateFmt="yyyy-MM-dd"   /><a class="inputDateButton" href="javascript:;">选择</a></p>
<p><label>下线时间：</label>
<input name="todate" type="text" size="20"  id="todate" value="<?=$row['todate']?$row['todate']:date("Y-m-d",time()+3600*24*30)?>" class="date" dateFmt="yyyy-MM-dd"  /><a class="inputDateButton" href="javascript:;">选择</a></p>
<p><label>时间间隔：</label>
<input name="myinterval" type="text" size="20"  id="myinterval" value="<?=$row['myinterval']?$row['myinterval']:0?>" />&nbsp;<span>N天后可再次投票，0 表示此IP地址只能投一次</span></p>

<p><label>是否启用：</label>
<?=html_radio($yesno_arr,$row["enabled"],'enabled')?></p>
<p><label>投票描述：</label>
<textarea  name="description" rows="10" cols="50"><?=$row["description"]?></textarea>
</p>
</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
</form>
</div>
